package cn.tedu;

import java.util.Random;
import java.util.Scanner;

public class Hello {
    public static void main(String[] args) {
        Random random=new Random();
        Scanner scan=new Scanner(System.in);
        int a= random.nextInt(100);
        System.out.println(a);
        while (true) {
            System.out.println("请输入数字：");
            int b=scan.nextInt();
            if (b==a){
                System.out.println("猜对了！");
                break;
            }else if (a>b){
                System.out.println("猜小了！");
            }else {
                System.out.println("猜大了");
            }
        }
    }
}
//https://gitee.com/yang-zhaoyi1/egmaven1.git         建立的仓库地址